Micron Document
🎖️GitЯра🎖️

Commit ea872f36d0923a1bf0cea8c4a04855cc1e488293


Parents : 611f9b3
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-06-03T15:02:43-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-06-03T15:02:43-05:00

build: migrate KMP Android DSL from androidLibrary {} to android {} (#5734)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Changes
Diff

diff --git a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/KotlinAndroid.kt b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/KotlinAndroid.kt
index 44a1a0ec19..32bc87ffff 100644
--- a/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/KotlinAndroid.kt
+++ b/build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/KotlinAndroid.kt
@@ -118,7 +118,7 @@ internal fun Project.configureKotlinMultiplatform() {
// Default: disable Android resources for most KMP modules.
// Modules that need resources (e.g. core:resources) override this
- // explicitly in their build.gradle.kts androidLibrary {} block.
+ // explicitly in their build.gradle.kts android {} block.
androidResources.enable = false
// Set the namespace automatically if not already set

diff --git a/core/ble/build.gradle.kts b/core/ble/build.gradle.kts
index e6cc2ec2a0..fecb298a11 100644
--- a/core/ble/build.gradle.kts
+++ b/core/ble/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts
index d535d4efff..2e7851a3d7 100644
--- a/core/common/build.gradle.kts
+++ b/core/common/build.gradle.kts
@@ -23,7 +23,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/data/build.gradle.kts b/core/data/build.gradle.kts
index 6f35b5d5ff..38a436fbd8 100644
--- a/core/data/build.gradle.kts
+++ b/core/data/build.gradle.kts
@@ -23,7 +23,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts
index 69ed36b5d6..20725071a6 100644
--- a/core/database/build.gradle.kts
+++ b/core/database/build.gradle.kts
@@ -24,7 +24,7 @@ plugins {
}
kotlin {
- androidLibrary {
+ android {
withHostTest { isIncludeAndroidResources = true }
withDeviceTest { instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }
}

diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts
index 2f401fb847..589db07f56 100644
--- a/core/datastore/build.gradle.kts
+++ b/core/datastore/build.gradle.kts
@@ -22,7 +22,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest {} }
+ android { withHostTest {} }
sourceSets {
commonMain.dependencies {

diff --git a/core/domain/build.gradle.kts b/core/domain/build.gradle.kts
index 2515332873..c75f24cfbd 100644
--- a/core/domain/build.gradle.kts
+++ b/core/domain/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts
index cb3d908d2a..f47e063395 100644
--- a/core/model/build.gradle.kts
+++ b/core/model/build.gradle.kts
@@ -24,7 +24,7 @@ plugins {
}
kotlin {
- androidLibrary {
+ android {
withHostTest { isIncludeAndroidResources = true }
withDeviceTest { instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }
}

diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts
index 4d0380ac65..905927fdc7 100644
--- a/core/network/build.gradle.kts
+++ b/core/network/build.gradle.kts
@@ -23,7 +23,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/prefs/build.gradle.kts b/core/prefs/build.gradle.kts
index f423ca9389..9f5a56efd8 100644
--- a/core/prefs/build.gradle.kts
+++ b/core/prefs/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest {} }
+ android { withHostTest {} }
sourceSets {
commonMain.dependencies {

diff --git a/core/proto/build.gradle.kts b/core/proto/build.gradle.kts
index 29a67f87d3..9ac2ce792b 100644
--- a/core/proto/build.gradle.kts
+++ b/core/proto/build.gradle.kts
@@ -23,7 +23,7 @@ plugins {
kotlin {
// Override minSdk for ATAK compatibility (standard is 26)
- androidLibrary { minSdk = 21 }
+ android { minSdk = 21 }
sourceSets {
commonMain.dependencies {

diff --git a/core/repository/build.gradle.kts b/core/repository/build.gradle.kts
index 6d1185c41b..2fb94257db 100644
--- a/core/repository/build.gradle.kts
+++ b/core/repository/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest {} }
+ android { withHostTest {} }
sourceSets {
commonMain.dependencies {

diff --git a/core/resources/build.gradle.kts b/core/resources/build.gradle.kts
index 82fe2a669e..da01f47b60 100644
--- a/core/resources/build.gradle.kts
+++ b/core/resources/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary {
+ android {
androidResources {
enable = true
resourcePrefix = "meshtastic_"

diff --git a/core/service/build.gradle.kts b/core/service/build.gradle.kts
index 59f7d3f959..3e522c9df3 100644
--- a/core/service/build.gradle.kts
+++ b/core/service/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/takserver/build.gradle.kts b/core/takserver/build.gradle.kts
index bb77c08232..d680b19c59 100644
--- a/core/takserver/build.gradle.kts
+++ b/core/takserver/build.gradle.kts
@@ -24,7 +24,7 @@ plugins {
kotlin {
@Suppress("UnstableApiUsage")
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts
index 315a8ddb24..b82aaa8c62 100644
--- a/core/testing/build.gradle.kts
+++ b/core/testing/build.gradle.kts
@@ -18,7 +18,7 @@
plugins { alias(libs.plugins.meshtastic.kmp.library) }
kotlin {
- androidLibrary { withHostTest {} }
+ android { withHostTest {} }
sourceSets {
commonMain.dependencies {

diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts
index b381dc9722..e89e50468f 100644
--- a/core/ui/build.gradle.kts
+++ b/core/ui/build.gradle.kts
@@ -26,7 +26,7 @@ plugins {
kotlin {
// Required for CMP files/ resources (emoji-data.json) to be packaged as Android assets.
// Without this, Res.readBytes() throws MissingResourceException at runtime.
- androidLibrary { androidResources.enable = true }
+ android { androidResources.enable = true }
sourceSets {
commonMain.dependencies {

diff --git a/feature/connections/build.gradle.kts b/feature/connections/build.gradle.kts
index 94aafd44d3..b792e98822 100644
--- a/feature/connections/build.gradle.kts
+++ b/feature/connections/build.gradle.kts
@@ -18,7 +18,7 @@
plugins { alias(libs.plugins.meshtastic.kmp.feature) }
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/feature/firmware/build.gradle.kts b/feature/firmware/build.gradle.kts
index f15ed141eb..b719f5a1be 100644
--- a/feature/firmware/build.gradle.kts
+++ b/feature/firmware/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/feature/intro/build.gradle.kts b/feature/intro/build.gradle.kts
index 01cd617339..d81209a888 100644
--- a/feature/intro/build.gradle.kts
+++ b/feature/intro/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/feature/map/build.gradle.kts b/feature/map/build.gradle.kts
index 2830fed6ee..5d294aad01 100644
--- a/feature/map/build.gradle.kts
+++ b/feature/map/build.gradle.kts
@@ -20,7 +20,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/feature/node/build.gradle.kts b/feature/node/build.gradle.kts
index 12ed4d8799..28210bf185 100644
--- a/feature/node/build.gradle.kts
+++ b/feature/node/build.gradle.kts
@@ -21,7 +21,7 @@ plugins {
}
kotlin {
- androidLibrary { withHostTest { isIncludeAndroidResources = true } }
+ android { withHostTest { isIncludeAndroidResources = true } }
sourceSets {
commonMain.dependencies {

diff --git a/feature/wifi-provision/build.gradle.kts b/feature/wifi-provision/build.gradle.kts
index 95fe576445..30347d66c3 100644
--- a/feature/wifi-provision/build.gradle.kts
+++ b/feature/wifi-provision/build.gradle.kts
@@ -20,7 +20,7 @@ plugins {
}
kotlin {
- androidLibrary {
+ android {
namespace = "org.meshtastic.feature.wifiprovision"
withHostTest {}
}

Served by rngit 1.5.0 - Generated in 0.26s